import { HashRouter as Router, Route, Switch } from "react-router-dom";
import { ConfigProvider } from "antd";
import { Provider } from "react-redux";
import AppLayout from "./views/AppLayout";
// 由于 antd 组件的默认文案是英文，所以需要修改为中文
import zhCN from "antd/es/locale/zh_CN";
// 引入redux store里切换
import store from "./store";
import AppLogin from "./views/AppLogin";
const App = () => {
  return (
    <Provider store={store}>
      <ConfigProvider locale={zhCN}>
        <Router>
          <Switch>
            <Route path="/login" component={AppLogin} />
            <Route path="/" component={AppLayout} />
          </Switch>
        </Router>
      </ConfigProvider>
    </Provider>
  );
};
export default App;
